<template>
  <PageContainer>
    <div class="classroom-info">
      <div class="left">
        <div class="image-icon">
          <img width="100%" height="100%" src="https://picsum.photos/50" alt="" />
        </div>
        <div class="info">
          <div class="name">{{ classroom.name }}</div>
          <div class="color-666 text-14px">
            面积：{{ classroom.area }}平米 <span class="pl-10xp">起订时长：{{ classroom.duration }}分钟</span>
          </div>
          <div class="color-666 text-14px">租赁时间间隔：{{ classroom.interval }}分钟</div>
        </div>
      </div>
      <div class="right">
        <div class="btn-group">
          <div class="btn">
            <img width="44" height="44" src="@/assets/images/delete.png" />
            <span>删除</span>
          </div>
          <div class="btn">
            <img width="44" height="44" src="@/assets/images/edit.png" />
            <span>编辑</span>
          </div>
        </div>
      </div>
    </div>
    <el-divider style="border-top: 10px solid #f7f7f7; margin-bottom: 0" />
    <el-tabs v-model="activeTabName">
      <el-tab-pane label="订单" name="order">
        <classroomRentalOrder />
      </el-tab-pane>
    </el-tabs>
  </PageContainer>
</template>

<script lang="ts" setup>
import classroomRentalOrder from './classroomHomeTabs/classroomRentalOrder.vue'
defineOptions({ name: 'ClassroomHome' })
const classroom = reactive({
  name: '测试教室',
  area: 20,
  duration: 60,
  interval: 10,
})
const activeTabName = ref('order')
</script>

<style scoped lang="scss">
.classroom-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  .left {
    display: flex;
    gap: 10px;
    .image-icon {
      width: 120px;
      height: 90px;
      border-radius: 6px;
      overflow: hidden;
    }
    .info {
      line-height: 1.6;
      .name {
        font-size: 16px;
        margin-bottom: 10px;
        line-height: 2;
      }
    }
  }
  .right {
    .btn-group {
      display: flex;
      gap: 20px;
      .btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        user-select: none;
        img {
          margin-bottom: 10px;
        }
        span {
          color: $main-color;
        }
      }
    }
  }
}
</style>
